traversal可分為三種方式: 1. Pre-order(前序遍歷),其實就是Depth-first search。2. In-order(中序遍歷) 與 3. Post-order(後序遍歷),In-order與Post-order也是Depth-first search的應用,只是稍微改變節點輸出的順序。此外還有一種Traversal為level-order traversal(層序遍歷),是Breadth-first search。
Full article